<?php
include "wechat.class.php";
$options = array(
		'token'=>'tokenaccesskey'  
	);
$weObj = new Wechat($options);
//$weObj->valid();

$data=<<<D
{
    "touser": "OPENID", 
    "msgtype": "news", 
    "news": {
        "content": "Hello World"
    }
}
D;

$weObj->sendCustomMessage($data);

exit;

$type = $weObj->getRev()->getRevType();
switch($type) {
	case Wechat::MSGTYPE_TEXT:
			$weObj->text("hello, I'm wechat")->reply();
			exit;
			break;
	case Wechat::MSGTYPE_EVENT:
			break;
	case Wechat::MSGTYPE_IMAGE:
			break;
	default:
			$weObj->text("help info")->reply();
}